package com.crm.manager.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crm.manager.domain.BusinessDetail;
import com.crm.manager.domain.Contracts;
import com.crm.manager.domain.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

//把合同的代码也写到这里面
@Mapper
public interface BusinessDetailMapper extends BaseMapper<BusinessDetail> {
    @Select("select * from contracts where contract_no = #{contractNo}")
    Contracts queryContract(String contractNo);

    @Update("update contracts set business_id = #{id1} where id = #{id}")
    void updateContract(@Param("id") String id, @Param("id1") Integer id1);

    @Select("select * from course_list where id = #{courseId}")
    Course getCourse(Integer courseId);
}
